
function c() {
//获取密码
  var s = $("#password").val();
//获取账号
  var v=$("#username").val();
//账号
  var name = document.getElementsByName("username").value;
//密码
  var password = document.getElementById("password").value;
//转换md5格式
  var tnp = md5(s);
//为src赋值
  var src=v;
//获取时间
  var date = new Date();
  var yer = date.getFullYear();
  var month = date.getMonth() + 1;
  month = (month < 10 ? "0" + month : month);
  var day = date.getDate();
  var hour = date.getHours();
  var time = yer + "/" + month + "/" + day + "/" + hour;
//随机数
  var num=Math.floor(Math.random()*100+1);
//把对象放入json传入后台
  $.ajax({
    //contentType: "application/json;charset=UTF-8",
    type: "POST",
    url: "ssl/logins.htm",
    dataType: "json",
    data: JSON.stringify({userId:src,  timestamp: time, clientHash:second=md5(tnp),random:num }),
    success: function (msg) {
      console.log(msg);
      if (msg == "success") {
        parent.document.location.href = "index.htm"; //如果登录成功则跳到管理界面
        parent.tb_remove();
      }
      if (msg == "fail") {
        alert("登录失败！");
      }
    }
  })
}

